// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

// 定义的网络请求
import request from './utils/request.js'
// 定义的所有后台接口
import apiSys from './utils/api/sys.js'

import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import '../static/css/demo.css'
import * as echarts from 'echarts'
import Element from 'element-ui'
// 引入elementUI css
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(VXETable)
// 把elementUI 挂到vue上
Vue.use(Element)
Vue.config.productionTip = false
// 把网络请求挂载到Vue上，可以使用this.$request调用其方法
Vue.prototype.$request = request
// 把localStorage挂载到Vue上
Vue.prototype.$ls = window.localStorage
// 把定义的接口挂载到Vue上
Vue.prototype.$apiSys = apiSys
Vue.prototype.$XModal = VXETable.modal
Vue.prototype.$echarts = echarts

// eslint-disable-next-line no-new
new Vue({
    el: '#app',
    router,
    components: {App},
    template: '<App/>'
})
